home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Celestin Apprentice 5
/
Apprentice-Release5.iso
/
Source Code
/
PowerPlant
/
AGA Classes 1.2
/
Utilities
/
LAGADiscloTriangle.h
< prev
next >
Wrap
Text File
|
1996-06-30
|
3KB
|
92 lines
// ===========================================================================
// LAGADiscloTriangle.h
// ===========================================================================
// “Apple Grayscale Appearance” compliant right-hand disclosure triangle.
// Uses the same PPob as LStdCheckBox. A left-hand version is left as an
// exercise for the reader :-).
//
// Copyright 1996 by Michael™ Hamel of ADInstruments NZ Ltd, mhamel@adi.co.nz
//
// You may use this source code in any application (commercial, shareware, freeware,
// postcardware, etc), without acknowledgment, but may not remove this notice.
//
// You may not sell this source code in any form. This source code may be placed on
// publicly accessible archive sites and source code disks. It may not be placed on
// for-profit archive sites and source code disks without the permission of the author.
//
// This source code is distributed "as is", without any warranty. Use it at your own
// risk.
//
// This class requires AGAColors.cp to be present in your project
//
// Version : 1.2
//
// Change History (most recent first, date in US form : mm/dd/yy):
//
// 06/30/96 ca Public release of version 1.2
// 06/04/96 ca Added RegisterClass method to ease registry
// Added guard macros in header files
// Increased version to 1.2
// 05/21/96 M™H Initial version set to 1.1 to be put with other AGA classes
//
// To Do:
//
#ifndef _H_LAGADiscloTriangle
#define _H_LAGADiscloTriangle
#pragma once
#include <LControl.h>
#include <LString.h>
class LAGADiscloTriangle : public LControl {
public:
enum { class_ID = 'AGAs' };
static void RegisterClass (); // <06/04/96 ca>
static LAGADiscloTriangle* CreateAGADiscloTriangleStream(LStream *inStream);
LAGADiscloTriangle();
LAGADiscloTriangle(const SPaneInfo &inPaneInfo,
MessageT inValueMessage,
Int32 inValue,
ResIDT traitsID,
Str255 title);
LAGADiscloTriangle(LStream *inStream);
virtual ~LAGADiscloTriangle();
void SetValue(Int32 inValue);
protected:
void HotSpotAction(short inHotSpot, Boolean inCurrInside,
Boolean inPrevInside);
void HotSpotResult(short inHotSpot);
void DisableSelf () { Refresh(); };
void EnableSelf () { Refresh(); };
private:
enum TriangleState {
kRight,
kIntermediate,
kDown
};
void DrawText();
void DrawTriangle(TriangleState stage, Boolean hilite);
void DrawSelf();
ResIDT mTextTraitsID;
Boolean mInColor;
LStr255 mTitle;
};
#endif